<?php
class Default_Model_Currency
{
 
	private $_table;
	//Initalizing Db Table  
	public function __construct(){
		$this->_table = new Default_Model_DbTable_Currency();
	}
	
	/**
	*add DB Adapter  
	*/	
	public function getAdapter(){
		return $this->_table->getAdapter();
	}
	/**
	*add One Row  
	*@param array $row 
	*@return boolean
	*/
	public function add($row){
		return $this->_table->insert($row);
	}
	
	
	public function getByCode($code){		
		$where = $this->_table->getAdapter()->quoteInto("currency_code = ?",$code);	
		return $this->_table->fetchRow($where);
	}
	 
}